package alogcore

import (
	"context"
)

// ALogger the interface for the logger basic method
type ALogger interface {
	Debug(context.Context, string, ...Field)
	Info(context.Context, string, ...Field)
	Warn(context.Context, string, ...Field)
	Error(context.Context, string, ...Field)
	Panic(context.Context, string, ...Field)
	Fatal(context.Context, string, ...Field)

	// Generate new alog contexts
	newContextForAlog(ctx context.Context) context.Context

	// It will add some fields, and alog will read the fields from grpc context
	addFieldsToContext(ctx context.Context, fields ...Field)
}

const (
	// AlogEncoderJson zap default json encoder, the log looks like this:
	// {"level":"debug","time":"2023-11-20T20:12:42.552+0800","lineNume":"/usr/local/go/src/testing/testing.go:1576","msg":"debug test"}
	AlogEncoderJson = "json"
	// AlogEncoderConsole zap default console encoder, the log looks like this:
	// 2023-11-20 20:29:48.641	DEBUG	/usr/local/go/src/testing/testing.go:1576	debug test
	AlogEncoderConsole = "console"
)
